Optimal. Leaf size=82 \[ -\frac {2 \sqrt {e} \tanh ^{-1}\left (\frac {\sqrt {b d-a e} (e+2 f x)}{\sqrt {e} \sqrt {b e-4 a f} \sqrt {d+e x+f x^2}}\right )}{\sqrt {b d-a e} \sqrt {b e-4 a f}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {996, 214}
\begin {gather*} -\frac {2 \sqrt {e} \tanh ^{-1}\left (\frac {(e+2 f x) \sqrt {b d-a e}}{\sqrt {e} \sqrt {b e-4 a f} \sqrt {d+e x+f x^2}}\right )}{\sqrt {b d-a e} \sqrt {b e-4 a f}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 996
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {d+e x+f x^2} \left (a+b x+\frac {b f x^2}{e}\right )} \, dx &=-\left ((2 e) \text {Subst}\left (\int \frac {1}{e (b e-4 a f)-(b d-a e) x^2} \, dx,x,\frac {e+2 f x}{\sqrt {d+e x+f x^2}}\right )\right )\\ &=-\frac {2 \sqrt {e} \tanh ^{-1}\left (\frac {\sqrt {b d-a e} (e+2 f x)}{\sqrt {e} \sqrt {b e-4 a f} \sqrt {d+e x+f x^2}}\right )}{\sqrt {b d-a e} \sqrt {b e-4 a f}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.43, size = 162, normalized size = 1.98 \begin {gather*} e \text {RootSum}\left [-b d e^2+a e^3+b d^2 f+2 b d e \sqrt {f} \text {$\#$1}-4 a e^2 \sqrt {f} \text {$\#$1}+b e^2 \text {$\#$1}^2-2 b d f \text {$\#$1}^2+4 a e f \text {$\#$1}^2-2 b e \sqrt {f} \text {$\#$1}^3+b f \text {$\#$1}^4\&,\frac {\log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right )}{b d \sqrt {f}-2 a e \sqrt {f}+b e \text {$\#$1}-b \sqrt {f} \text {$\#$1}^2}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(490\) vs.
\(2(68)=136\).
time = 0.27, size = 491, normalized size = 5.99
method | result | size |
default | \(e \left (\frac {\ln \left (\frac {-\frac {2 \left (a e -b d \right )}{b}-\frac {\sqrt {-e b \left (4 f a -e b \right )}\, \left (x +\frac {e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}\right )}{b}+2 \sqrt {-\frac {a e -b d}{b}}\, \sqrt {\left (x +\frac {e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}\right )^{2} f -\frac {\sqrt {-e b \left (4 f a -e b \right )}\, \left (x +\frac {e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}\right )}{b}-\frac {a e -b d}{b}}}{x +\frac {e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}}\right )}{\sqrt {-e b \left (4 f a -e b \right )}\, \sqrt {-\frac {a e -b d}{b}}}-\frac {\ln \left (\frac {-\frac {2 \left (a e -b d \right )}{b}+\frac {\sqrt {-e b \left (4 f a -e b \right )}\, \left (x -\frac {-e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}\right )}{b}+2 \sqrt {-\frac {a e -b d}{b}}\, \sqrt {\left (x -\frac {-e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}\right )^{2} f +\frac {\sqrt {-e b \left (4 f a -e b \right )}\, \left (x -\frac {-e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}\right )}{b}-\frac {a e -b d}{b}}}{x -\frac {-e b +\sqrt {-e b \left (4 f a -e b \right )}}{2 b f}}\right )}{\sqrt {-e b \left (4 f a -e b \right )}\, \sqrt {-\frac {a e -b d}{b}}}\right )\) | \(491\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 179 vs.
\(2 (72) = 144\).
time = 2.43, size = 1062, normalized size = 12.95 \begin {gather*} \left [\frac {1}{2} \, \sqrt {-\frac {e}{4 \, a b d f + a b e^{2} - {\left (b^{2} d + 4 \, a^{2} f\right )} e}} \log \left (\frac {16 \, b^{2} d^{2} f^{4} x^{4} + 4 \, {\left (32 \, a b^{2} d^{2} f^{4} x^{3} + {\left (a b^{2} x - a^{2} b\right )} e^{6} + {\left (3 \, a b^{2} f x^{2} + 3 \, a b^{2} d + 4 \, a^{3} f - {\left (b^{3} d + 14 \, a^{2} b f\right )} x\right )} e^{5} + {\left (2 \, a b^{2} f^{2} x^{3} - 2 \, b^{3} d^{2} - 16 \, a^{2} b d f - 3 \, {\left (b^{3} d f + 12 \, a^{2} b f^{2}\right )} x^{2} + 2 \, {\left (11 \, a b^{2} d f + 20 \, a^{3} f^{2}\right )} x\right )} e^{4} + 2 \, {\left (6 \, a b^{2} d^{2} f + 8 \, a^{3} d f^{2} - {\left (b^{3} d f^{2} + 12 \, a^{2} b f^{3}\right )} x^{3} + 24 \, {\left (a b^{2} d f^{2} + 2 \, a^{3} f^{3}\right )} x^{2} - 4 \, {\left (b^{3} d^{2} f + 10 \, a^{2} b d f^{2}\right )} x\right )} e^{3} - 4 \, {\left (4 \, a^{2} b d^{2} f^{2} - 8 \, {\left (a b^{2} d f^{3} + 2 \, a^{3} f^{4}\right )} x^{3} + 3 \, {\left (b^{3} d^{2} f^{2} + 12 \, a^{2} b d f^{3}\right )} x^{2} - 2 \, {\left (5 \, a b^{2} d^{2} f^{2} + 4 \, a^{3} d f^{3}\right )} x\right )} e^{2} + 8 \, {\left (6 \, a b^{2} d^{2} f^{3} x^{2} - 4 \, a^{2} b d^{2} f^{3} x - {\left (b^{3} d^{2} f^{3} + 12 \, a^{2} b d f^{4}\right )} x^{3}\right )} e\right )} \sqrt {f x^{2} + x e + d} \sqrt {-\frac {e}{4 \, a b d f + a b e^{2} - {\left (b^{2} d + 4 \, a^{2} f\right )} e}} + {\left (b^{2} x^{2} - 6 \, a b x + a^{2}\right )} e^{6} + 2 \, {\left (b^{2} f x^{3} - 19 \, a b f x^{2} - 4 \, a b d + 4 \, {\left (b^{2} d + 4 \, a^{2} f\right )} x\right )} e^{5} + {\left (b^{2} f^{2} x^{4} - 64 \, a b f^{2} x^{3} - 80 \, a b d f x + 8 \, b^{2} d^{2} + 24 \, a^{2} d f + 32 \, {\left (b^{2} d f + 5 \, a^{2} f^{2}\right )} x^{2}\right )} e^{4} - 16 \, {\left (2 \, a b f^{3} x^{4} + 13 \, a b d f^{2} x^{2} + 2 \, a b d^{2} f - {\left (3 \, b^{2} d f^{2} + 16 \, a^{2} f^{3}\right )} x^{3} - 2 \, {\left (b^{2} d^{2} f + 4 \, a^{2} d f^{2}\right )} x\right )} e^{3} - 8 \, {\left (32 \, a b d f^{3} x^{3} + 12 \, a b d^{2} f^{2} x - 2 \, a^{2} d^{2} f^{2} - {\left (3 \, b^{2} d f^{3} + 16 \, a^{2} f^{4}\right )} x^{4} - 2 \, {\left (3 \, b^{2} d^{2} f^{2} + 8 \, a^{2} d f^{3}\right )} x^{2}\right )} e^{2} - 32 \, {\left (4 \, a b d f^{4} x^{4} - b^{2} d^{2} f^{3} x^{3} + 3 \, a b d^{2} f^{3} x^{2}\right )} e}{b^{2} f^{2} x^{4} + {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} e^{2} + 2 \, {\left (b^{2} f x^{3} + a b f x^{2}\right )} e}\right ), \frac {\arctan \left (\frac {{\left (4 \, b d f^{2} x^{2} + {\left (b x - a\right )} e^{3} + {\left (b f x^{2} - 8 \, a f x + 2 \, b d\right )} e^{2} - 4 \, {\left (2 \, a f^{2} x^{2} - b d f x + a d f\right )} e\right )} \sqrt {f x^{2} + x e + d} e^{\frac {1}{2}}}{2 \, \sqrt {4 \, a b d f + a b e^{2} - {\left (b^{2} d + 4 \, a^{2} f\right )} e} {\left (x e^{3} + {\left (3 \, f x^{2} + d\right )} e^{2} + 2 \, {\left (f^{2} x^{3} + d f x\right )} e\right )}}\right ) e^{\frac {1}{2}}}{\sqrt {4 \, a b d f + a b e^{2} - {\left (b^{2} d + 4 \, a^{2} f\right )} e}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} e \int \frac {1}{a e \sqrt {d + e x + f x^{2}} + b e x \sqrt {d + e x + f x^{2}} + b f x^{2} \sqrt {d + e x + f x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 847 vs.
\(2 (72) = 144\).
time = 6.49, size = 847, normalized size = 10.33 \begin {gather*} \frac {\sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} \log \left ({\left | -4 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} b d f^{2} + 8 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} a f^{2} e - 4 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} b d f^{\frac {3}{2}} e + 4 \, b d^{2} f^{2} - {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} b f e^{2} + 8 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} a f^{\frac {3}{2}} e^{2} + 4 \, \sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} f^{\frac {3}{2}} - 3 \, b d f e^{2} - {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} b \sqrt {f} e^{3} + 4 \, \sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} f e + 2 \, a f e^{3} + \sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} \sqrt {f} e^{2} \right |}\right )}{4 \, a b d f - b^{2} d e - 4 \, a^{2} f e + a b e^{2}} - \frac {\sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} \log \left ({\left | -4 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} b d f^{2} + 8 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} a f^{2} e - 4 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} b d f^{\frac {3}{2}} e + 4 \, b d^{2} f^{2} - {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} b f e^{2} + 8 \, {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} a f^{\frac {3}{2}} e^{2} - 4 \, \sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )}^{2} f^{\frac {3}{2}} - 3 \, b d f e^{2} - {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} b \sqrt {f} e^{3} - 4 \, \sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} {\left (\sqrt {f} x - \sqrt {f x^{2} + x e + d}\right )} f e + 2 \, a f e^{3} - \sqrt {-4 \, a b d f e + b^{2} d e^{2} + 4 \, a^{2} f e^{2} - a b e^{3}} \sqrt {f} e^{2} \right |}\right )}{4 \, a b d f - b^{2} d e - 4 \, a^{2} f e + a b e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\sqrt {f\,x^2+e\,x+d}\,\left (a+b\,x+\frac {b\,f\,x^2}{e}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________